#ifndef PROPERTIES_H
#define PROPERTIES_H

#include <qvariant.h>

// The following is a hack, but I don't know a better way to do this //;
// At this place the namespace is not defined, so create it and use it //;
namespace Snmp_pp {};
using namespace Snmp_pp;

#include <Qt3Support/Q3MimeSourceFactory>
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QComboBox>
#include <QtGui/QDialog>
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QTabWidget>
#include <QtGui/QWidget>
#include "snmp_pp/snmp_pp.h"

QT_BEGIN_NAMESPACE

class Ui_Properties
{
public:
    QGridLayout *gridLayout;
    QTabWidget *tabWidget;
    QWidget *Widget8;
    QGridLayout *gridLayout1;
    QPushButton *push_button_reset;
    QPushButton *push_button_apply;
    QLabel *text_label_auth_prot;
    QLabel *text_label_auth_pass;
    QLabel *text_label_priv_pass;
    QLabel *textlabel_priv_prot;
    QLabel *text_label_sec_name;
    QComboBox *combo_box_sec_name;
    QComboBox *combo_box_auth_prot;
    QLineEdit *line_edit_auth_pass;
    QComboBox *combo_box_priv_prot;
    QLineEdit *line_edit_priv_pass;
    QPushButton *push_button_add_user;
    QPushButton *push_button_del_user;
    QSpacerItem *spacer2;
    QHBoxLayout *hboxLayout;
    QSpacerItem *Horizontal_Spacing2;
    QPushButton *button_close;

    void setupUi(QDialog *Properties)
    {
        if (Properties->objectName().isEmpty())
            Properties->setObjectName(QString::fromUtf8("Properties"));
        Properties->resize(583, 441);
        Properties->setSizeGripEnabled(true);
        gridLayout = new QGridLayout(Properties);
        gridLayout->setSpacing(6);
        gridLayout->setContentsMargins(11, 11, 11, 11);
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
        tabWidget = new QTabWidget(Properties);
        tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
        Widget8 = new QWidget();
        Widget8->setObjectName(QString::fromUtf8("Widget8"));
        gridLayout1 = new QGridLayout(Widget8);
        gridLayout1->setSpacing(6);
        gridLayout1->setContentsMargins(11, 11, 11, 11);
        gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
        push_button_reset = new QPushButton(Widget8);
        push_button_reset->setObjectName(QString::fromUtf8("push_button_reset"));

        gridLayout1->addWidget(push_button_reset, 5, 4, 1, 1);

        push_button_apply = new QPushButton(Widget8);
        push_button_apply->setObjectName(QString::fromUtf8("push_button_apply"));

        gridLayout1->addWidget(push_button_apply, 5, 5, 1, 1);

        text_label_auth_prot = new QLabel(Widget8);
        text_label_auth_prot->setObjectName(QString::fromUtf8("text_label_auth_prot"));
        text_label_auth_prot->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
        text_label_auth_prot->setWordWrap(false);

        gridLayout1->addWidget(text_label_auth_prot, 1, 0, 1, 1);

        text_label_auth_pass = new QLabel(Widget8);
        text_label_auth_pass->setObjectName(QString::fromUtf8("text_label_auth_pass"));
        text_label_auth_pass->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
        text_label_auth_pass->setWordWrap(false);

        gridLayout1->addWidget(text_label_auth_pass, 2, 0, 1, 1);

        text_label_priv_pass = new QLabel(Widget8);
        text_label_priv_pass->setObjectName(QString::fromUtf8("text_label_priv_pass"));
        text_label_priv_pass->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
        text_label_priv_pass->setWordWrap(false);

        gridLayout1->addWidget(text_label_priv_pass, 4, 0, 1, 1);

        textlabel_priv_prot = new QLabel(Widget8);
        textlabel_priv_prot->setObjectName(QString::fromUtf8("textlabel_priv_prot"));
        textlabel_priv_prot->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
        textlabel_priv_prot->setWordWrap(false);

        gridLayout1->addWidget(textlabel_priv_prot, 3, 0, 1, 1);

        text_label_sec_name = new QLabel(Widget8);
        text_label_sec_name->setObjectName(QString::fromUtf8("text_label_sec_name"));
        text_label_sec_name->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
        text_label_sec_name->setWordWrap(false);

        gridLayout1->addWidget(text_label_sec_name, 0, 0, 1, 1);

        combo_box_sec_name = new QComboBox(Widget8);
        combo_box_sec_name->setObjectName(QString::fromUtf8("combo_box_sec_name"));
        combo_box_sec_name->setDuplicatesEnabled(false);

        gridLayout1->addWidget(combo_box_sec_name, 0, 1, 1, 5);

        combo_box_auth_prot = new QComboBox(Widget8);
        combo_box_auth_prot->setObjectName(QString::fromUtf8("combo_box_auth_prot"));

        gridLayout1->addWidget(combo_box_auth_prot, 1, 1, 1, 5);

        line_edit_auth_pass = new QLineEdit(Widget8);
        line_edit_auth_pass->setObjectName(QString::fromUtf8("line_edit_auth_pass"));

        gridLayout1->addWidget(line_edit_auth_pass, 2, 1, 1, 5);

        combo_box_priv_prot = new QComboBox(Widget8);
        combo_box_priv_prot->setObjectName(QString::fromUtf8("combo_box_priv_prot"));

        gridLayout1->addWidget(combo_box_priv_prot, 3, 1, 1, 5);

        line_edit_priv_pass = new QLineEdit(Widget8);
        line_edit_priv_pass->setObjectName(QString::fromUtf8("line_edit_priv_pass"));

        gridLayout1->addWidget(line_edit_priv_pass, 4, 1, 1, 5);

        push_button_add_user = new QPushButton(Widget8);
        push_button_add_user->setObjectName(QString::fromUtf8("push_button_add_user"));

        gridLayout1->addWidget(push_button_add_user, 5, 0, 1, 2);

        push_button_del_user = new QPushButton(Widget8);
        push_button_del_user->setObjectName(QString::fromUtf8("push_button_del_user"));

        gridLayout1->addWidget(push_button_del_user, 5, 2, 1, 1);

        spacer2 = new QSpacerItem(110, 21, QSizePolicy::Expanding, QSizePolicy::Minimum);

        gridLayout1->addItem(spacer2, 5, 3, 1, 1);

        tabWidget->addTab(Widget8, QString());

        gridLayout->addWidget(tabWidget, 0, 0, 1, 1);

        hboxLayout = new QHBoxLayout();
        hboxLayout->setSpacing(6);
        hboxLayout->setContentsMargins(0, 0, 0, 0);
        hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
        Horizontal_Spacing2 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

        hboxLayout->addItem(Horizontal_Spacing2);

        button_close = new QPushButton(Properties);
        button_close->setObjectName(QString::fromUtf8("button_close"));
        button_close->setAutoDefault(true);
        button_close->setDefault(true);

        hboxLayout->addWidget(button_close);


        gridLayout->addLayout(hboxLayout, 1, 0, 1, 1);


        retranslateUi(Properties);
        QObject::connect(button_close, SIGNAL(clicked()), Properties, SLOT(accept()));
        QObject::connect(combo_box_sec_name, SIGNAL(activated(QString)), Properties, SLOT(combo_box_sec_name_activated(QString)));
        QObject::connect(push_button_reset, SIGNAL(clicked()), Properties, SLOT(push_button_reset_clicked()));
        QObject::connect(push_button_apply, SIGNAL(clicked()), Properties, SLOT(push_button_apply_clicked()));
        QObject::connect(combo_box_auth_prot, SIGNAL(activated(int)), Properties, SLOT(combo_box_auth_prot_activated(int)));
        QObject::connect(combo_box_priv_prot, SIGNAL(activated(int)), Properties, SLOT(combo_box_priv_prot_activated(int)));
        QObject::connect(push_button_add_user, SIGNAL(clicked()), Properties, SLOT(push_button_add_user_clicked()));
        QObject::connect(push_button_del_user, SIGNAL(clicked()), Properties, SLOT(push_button_del_user_clicked()));

        QMetaObject::connectSlotsByName(Properties);
    } // setupUi

    void retranslateUi(QDialog *Properties)
    {
        Properties->setWindowTitle(QApplication::translate("Properties", "Properties", 0, QApplication::UnicodeUTF8));
        push_button_reset->setText(QApplication::translate("Properties", "Reset", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
        push_button_reset->setProperty("toolTip", QVariant(QApplication::translate("Properties", "Reset the values to the old values", 0, QApplication::UnicodeUTF8)));
#endif // QT_NO_TOOLTIP
        push_button_apply->setText(QApplication::translate("Properties", "Apply", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
        push_button_apply->setProperty("toolTip", QVariant(QApplication::translate("Properties", "Changes are only stored if this button is clicked", 0, QApplication::UnicodeUTF8)));
#endif // QT_NO_TOOLTIP
        text_label_auth_prot->setText(QApplication::translate("Properties", "AuthProtocol", 0, QApplication::UnicodeUTF8));
        text_label_auth_pass->setText(QApplication::translate("Properties", "AuthPassword", 0, QApplication::UnicodeUTF8));
        text_label_priv_pass->setText(QApplication::translate("Properties", "PrivPassword", 0, QApplication::UnicodeUTF8));
        textlabel_priv_prot->setText(QApplication::translate("Properties", "PrivProtocol", 0, QApplication::UnicodeUTF8));
        text_label_sec_name->setText(QApplication::translate("Properties", "SecurityName", 0, QApplication::UnicodeUTF8));
        combo_box_auth_prot->clear();
        combo_box_auth_prot->insertItems(0, QStringList()
         << QApplication::translate("Properties", "None", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "HMAC-MD5", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "HMAC-SHA", 0, QApplication::UnicodeUTF8)
        );
        combo_box_priv_prot->clear();
        combo_box_priv_prot->insertItems(0, QStringList()
         << QApplication::translate("Properties", "None", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "DES", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "IDEA", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "AES128", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "AES196", 0, QApplication::UnicodeUTF8)
         << QApplication::translate("Properties", "AES256", 0, QApplication::UnicodeUTF8)
        );
        push_button_add_user->setText(QApplication::translate("Properties", "Add new user", 0, QApplication::UnicodeUTF8));
        push_button_del_user->setText(QApplication::translate("Properties", "Delete User", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
        push_button_del_user->setProperty("toolTip", QVariant(QApplication::translate("Properties", "Delete the selected user", 0, QApplication::UnicodeUTF8)));
#endif // QT_NO_TOOLTIP
        tabWidget->setTabText(tabWidget->indexOf(Widget8), QApplication::translate("Properties", "USM", 0, QApplication::UnicodeUTF8));
        button_close->setText(QApplication::translate("Properties", "Close", 0, QApplication::UnicodeUTF8));
        button_close->setShortcut(QString());
    } // retranslateUi

};

namespace Ui {
    class Properties: public Ui_Properties {};
} // namespace Ui

QT_END_NAMESPACE

class Properties : public QDialog, public Ui::Properties
{
    Q_OBJECT

public:
    Properties(QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WindowFlags fl = 0);
    ~Properties();

    void set_snmp( Snmp * s );

public slots:
    virtual void combo_box_sec_name_activated( const QString & sec_name );
    virtual void push_button_reset_clicked();
    virtual void push_button_apply_clicked();
    virtual void combo_box_auth_prot_activated( int auth_prot );
    virtual void combo_box_priv_prot_activated( int priv_prot );
    virtual void push_button_add_user_clicked();
    virtual void push_button_del_user_clicked();

protected:
    v3MP *v3mp;
    USM *usm;

protected slots:
    virtual void languageChange();

private:
    Snmp *snmp;

};

#endif // PROPERTIES_H
